﻿
@{
    ViewBag.Title = "Index";
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
    <link href="@Url.Content("~/lib/bootstrap/css/bootstrap.min.css")" rel="stylesheet">
    <link href="@Url.Content("~/lib/font-awesome/css/font-awesome.min.css")" rel="stylesheet" />
    <link href="@Url.Content("~/css/AdminLTE.min.css")" rel="stylesheet" />
    <link href="@Url.Content("~/css/skins/skin-blue.css")" rel="stylesheet">
</head>
<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <!-- header  -->
        <header class="main-header">
            <!-- Logo -->
            <a href="@Url.Content("~/Home/Index")" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini"><b>车管</b>通</span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg"><b>车管</b>通</span>
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top">
                <!-- 菜单显示隐藏按钮 -->
                <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                    <span class="sr-only">Toggle navigation</span>
                </a>
                <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">
                        <li class="dropdown user user-menu">
                            <a href="#" class="dropdown-toggle" style=" height:50px" data-toggle="dropdown">
                                @ViewBag.CompanyName
                            </a>
                        </li>
                        <li class="dropdown user user-menu">
                            <a href="#" class="dropdown-toggle" style=" height:50px" data-toggle="dropdown">
                                <img src="@Url.Content("~/images/avatar.png")" class="user-image" alt="User Image">
                                <span class="hidden-xs">@ViewBag.UserName</span>

                            </a>
                            <ul class="dropdown-menu">
                                <li class="menu" id="UserExit">
                                    <a style="padding: 10px;">
                                        <i class="fa fa-fw fa-sign-out"></i>
                                        退出
                                    </a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>

        <!-- 左侧导航 -->
        <aside class="main-sidebar">
            <section class="sidebar">
                <ul class="sidebar-menu" data-widget="tree">
                    <li class="treeview">
                        <a href="#">
                            <i class="fa fa-dashboard"></i> <span>系统管理</span>
                            <span class="pull-right-container">
                                <i class="fa fa-angle-left pull-right"></i>
                            </span>
                        </a>
                        <ul class="treeview-menu">
                            <li><a href="javascript:gotoDetail('@Url.Action("ClueList","Clue")')"><i class="fa fa-circle-o"></i>线索管理</a></li>
                            @if (ViewBag.RoleID == 10000)
                            {
                                <li><a href="javascript:gotoDetail('@Url.Action("AdminUserList","User")')"><i class="fa fa-circle-o"></i>管理员账户</a></li>
                                <li><a href="javascript:gotoDetail('@Url.Action("CallReport","Report")')"><i class="fa fa-circle-o"></i>呼叫记录</a></li>
                            }
                            else if (ViewBag.RoleID == 1)
                            {
                                <li><a href="javascript:gotoDetail('@Url.Action("UserList","User")')"><i class="fa fa-circle-o"></i>用户管理</a></li>
                            }

                        </ul>
                    </li>
                </ul>
            </section>
            <!-- /.sidebar -->
        </aside>

        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <iframe id="menuFrame" name="menuFrame" src="@Url.Action("ClueList", "Clue")" style="overflow:visible;" scrolling="auto" frameborder="no" height="100%" width="100%"></iframe>
        </div>
    </div>
    <script src="@Url.Content("~/lib/jquery/jquery.js")"></script>
    <script src="@Url.Content("~/lib/bootstrap/js/bootstrap.min.js")"></script>
    <script src="@Url.Content("~/js/adminlte.min.js")"></script>
    <script src="@Url.Content("~/lib/layer/layer.js")"></script>
    <script src="@Url.Content("~/js/bmcw.js")"></script>
    <script type="text/javascript">

        //退出
        $("#UserExit").click(function () {
            BMCW.ajax({
                url: '@Url.Action("LoginOut", "Account")',
                type: "GET",
                success: function (o) {
                    if (o.status == 0) {
                        location.href = '@Url.Action("Login", "Account")';
                    } else {
                        BMCW.alert(o.message);
                    }
                }
            });
        });

        $("#menuFrame").height(window.innerHeight - 56);

        $(window).resize(function () {
            $("#menuFrame").height(window.innerHeight - 56);
        })

        function gotoDetail(url) {
            $("#menuFrame").prop("src",url)
        }
    </script>
</body>
</html>
